package com.cashmama.market.api.infras.exception;


import com.cashmama.market.api.infras.enums.ErrorCodeEnums;

/**
 * @Author: wujiapeng
 * @Description:
 * @Date: created in 15:11 2018/10/30
 */
public class TongdunReportException extends RuntimeException{
    private static final long serialVersionUID = -2944610625091962550L;
    private ErrorCodeEnums errorCode;


    public TongdunReportException() {
    }

    public TongdunReportException(ErrorCodeEnums errorCode) {
        super(errorCode.getDesc());
        this.errorCode = errorCode;
    }

    public TongdunReportException(ErrorCodeEnums errorCodeEnum, String message) {
        super(message);
        this.errorCode = errorCodeEnum;
    }

    public TongdunReportException(String message) {
        super(message);
    }

    public TongdunReportException(String message, Throwable cause) {
        super(message, cause);
    }

    public TongdunReportException(Throwable cause) {
        super(cause);
    }

    public TongdunReportException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public ErrorCodeEnums getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(ErrorCodeEnums errorCode) {
        this.errorCode = errorCode;
    }
}
